From: Glenn Morris Date: Fri, 17 Aug 2007 07:17:13 +0000 (+0000) Subject: (compilation-get-file-structure): Make use of the directory part when X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~421^2~17372 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=882ca3e1ecf1aa50cf2769c052d5f724aced29a4;p=emacs.git (compilation-get-file-structure): Make use of the directory part when checking for an existing entry, to handle files with same basename in different directories. --- diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 805ed3c4040..9b83cfc9f3d 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -1972,7 +1972,13 @@ The file-structure looks like this: ;; Store it for the possibly unnormalized name (puthash file ;; Retrieve or create file-structure for normalized name - (or (gethash (list filename) compilation-locs) + ;; The gethash used to not use spec-directory, but + ;; this leads to errors when files in different + ;; directories have the same name: + ;; http://lists.gnu.org/archive/html/emacs-devel/2007-08/msg00463.html + (or (gethash (cons filename spec-directory) compilation-locs) + ;; TODO should this, without spec-directory, be + ;; done at all? (puthash (list filename) (list (list filename spec-directory) fmt) compilation-locs))